package test;

import java.io.UnsupportedEncodingException;

import com.invokecfunc;
import com.ivokebackimpl;
import com.sun.jna.*;

public class testc {
	public static void main(String args[]) throws UnsupportedEncodingException {
		int addret = invokecfunc.INSTANCE.Add(10, 10);
		int subret = invokecfunc.INSTANCE.Sub(100, 50);
		System.out.println(addret);
		System.out.println(subret);

		ivokebackimpl call = new ivokebackimpl();
		Pointer p1 = new Memory(4);
		Pointer p2 = new Memory(4);
		invokecfunc.INSTANCE.Get(p1, p2, call);
		//synchronized(call){
			try {
				call.wait();
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				e.printStackTrace();
			}
		//}
	

		System.out.println(p1.getInt(0));
		System.out.println(p2.getInt(0));
	}
}
